import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

public class Demo7 {
	public static  void main(String[] args){
		//这是按照字节进行输出
		try(InputStream inputStream=new FileInputStream("d:/test.txt")) {
				byte [] buf=new byte[1024];
				int len =inputStream.read(buf);
				System.out.println("len "+len);
				for(int i =0;i<len;i++) {
					System.out.printf("%x\n", buf[i]);
			}
		}catch(Exception e) {
			e.printStackTrace();
		}
	}
}
